#ifndef GLOBAL_H
#define GLOBAL_H
#include <QWidget>
#include <qtcpsocket.h>
#include <QHostAddress>
#include <QMessageBox>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonParseError>
#include <QDebug>

struct Message
{
    QString messageReceiver;
    int receiverId;
    QString messageTime;
    QString messageSender;
    int senderId;
    QString messageContent;

    QString getTimeAndSender()
    {
        return messageTime+" "+messageSender+":";
    }

    QString getMessageContent()
    {
        return "<font color = 'black' size = 24px>" + messageContent + "</font>";
    }

};

#endif // GLOBAL_H
